package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * MemberPrepaid entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_MEMBER_PREPAID", schema = "HCD_DEV")
public class MemberPrepaid extends Entity implements java.io.Serializable {

	// Fields

	private Long prepaidId;
	private Member memberByMemberId;
	private Member memberByCheckerId;
	private Company company;
	private Store store;
	private Float balance;
	private Integer type;
	private Float prepaid;
	private String promote;
	private Float given;
	private String account;
	private Long addTime;

	// Constructors

	/** default constructor */
	public MemberPrepaid() {
	}

	/** minimal constructor */
	public MemberPrepaid(Member memberByMemberId, Member memberByCheckerId, Float balance,
			Integer type, Float prepaid, Float given, Long addTime) {
		this.memberByMemberId = memberByMemberId;
		this.memberByCheckerId = memberByCheckerId;
		this.balance = balance;
		this.type = type;
		this.prepaid = prepaid;
		this.given = given;
		this.addTime = addTime;
	}

	/** full constructor */
	public MemberPrepaid(Member memberByMemberId, Member memberByCheckerId, Company company,
			Store store, Float balance, Integer type, Float prepaid, String promote, Float given,
			String account, Long addTime) {
		this.memberByMemberId = memberByMemberId;
		this.memberByCheckerId = memberByCheckerId;
		this.company = company;
		this.store = store;
		this.balance = balance;
		this.type = type;
		this.prepaid = prepaid;
		this.promote = promote;
		this.given = given;
		this.account = account;
		this.addTime = addTime;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_MEMBER_PREPAID")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "PREPAID_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getPrepaidId() {
		return this.prepaidId;
	}

	public void setPrepaidId(Long prepaidId) {
		this.prepaidId = prepaidId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MEMBER_ID", nullable = false)
	public Member getMemberByMemberId() {
		return this.memberByMemberId;
	}

	public void setMemberByMemberId(Member memberByMemberId) {
		this.memberByMemberId = memberByMemberId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHECKER_ID", nullable = false)
	public Member getMemberByCheckerId() {
		return this.memberByCheckerId;
	}

	public void setMemberByCheckerId(Member memberByCheckerId) {
		this.memberByCheckerId = memberByCheckerId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COMPANY_ID")
	public Company getCompany() {
		return this.company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_ID")
	public Store getStore() {
		return this.store;
	}

	public void setStore(Store store) {
		this.store = store;
	}

	@Column(name = "BALANCE", nullable = false, precision = 8)
	public Float getBalance() {
		return this.balance;
	}

	public void setBalance(Float balance) {
		this.balance = balance;
	}

	@Column(name = "TYPE", nullable = false, precision = 2, scale = 0)
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "PREPAID", nullable = false, precision = 8)
	public Float getPrepaid() {
		return this.prepaid;
	}

	public void setPrepaid(Float prepaid) {
		this.prepaid = prepaid;
	}

	@Column(name = "PROMOTE", length = 500)
	public String getPromote() {
		return this.promote;
	}

	public void setPromote(String promote) {
		this.promote = promote;
	}

	@Column(name = "GIVEN", nullable = false, precision = 8)
	public Float getGiven() {
		return this.given;
	}

	public void setGiven(Float given) {
		this.given = given;
	}

	@Column(name = "ACCOUNT", length = 100)
	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "ADD_TIME", nullable = false, precision = 15, scale = 0)
	public Long getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Long addTime) {
		this.addTime = addTime;
	}

}